package com.net.xpay.common.domain.partner;

import com.net.common.domain.VersionedDomain;
import com.net.xpay.common.enums.user.CommissionMode;
import com.net.xpay.common.enums.user.ServicePayMode;
import com.net.xpay.common.enums.user.UserTag;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * 2020/4/25 21:01

 * 合伙人邀请码
 */
@Getter
@Setter
@NoArgsConstructor
public class PartnerCode extends VersionedDomain {

    @ApiModelProperty(notes = "合伙人id")
    private Long partnerId;

    @ApiModelProperty(notes = "上级合伙人id")
    private Long fatherPartnerId;

    @ApiModelProperty(notes = "合伙人邀请码")
    private String pma;

    @ApiModelProperty(notes = "收费模式")
    private ServicePayMode mode;

    @ApiModelProperty(notes = "分佣模式")
    private CommissionMode commissionMode;

    /**
     * 比例收费模式
     */
    @ApiModelProperty(notes = "服务费收费比例")
    private BigDecimal serviceRatio;

    @ApiModelProperty(notes = "到卡服务费收费比例")
    private BigDecimal bankServiceRatio;

    /**
     * 分佣模式 按利润分成模式
     */
    @ApiModelProperty(notes = "合伙人毛利润分佣比例")
    private BigDecimal benefitRatio;

    //1.百分比模式 (商户服务费支出 - 二级合伙人收益）*上级合伙人分佣比例 2.指定上级费率
    @ApiModelProperty(notes = "上级合伙人分佣比例")
    private BigDecimal fatherBenefitRatio;

    @ApiModelProperty(notes = "上级模式")
    private CommissionMode fatherCommissionMode;

    //二级合伙人 成本模式下 上级模式是指定上级费率模式下使用
    @ApiModelProperty(notes = "上级合伙人到户分佣费率")
    private BigDecimal fatherServiceRatio;

    //二级合伙人 成本模式下 上级模式是指定上级费率模式下使用
    @ApiModelProperty(notes = "上级合伙人到卡分佣费率")
    private BigDecimal fatherBankServiceRatio;

    /**
     * 分佣模式 按成本算模式
     */
    @ApiModelProperty(notes = "服务费成本价收费比例")
    private BigDecimal costServiceRatio;

    @ApiModelProperty(notes = "安全付到卡服务费成本价收费比例")
    private BigDecimal safePayBankCostServiceRatio;

    /**
     * 笔数收费模式
     */
    @ApiModelProperty(notes = "服务费定价 分")
    private Long serviceUnitPrice;

    @ApiModelProperty(notes = "合伙人分佣 分")
    private Long benefit;

    @ApiModelProperty(notes = "上级合伙人分佣 分")
    private Long fatherBenefit;

    @ApiModelProperty(notes = "邀请的用户标签")
    private UserTag userTag;

    @ApiModelProperty(notes = "备注")
    private String remark;

    @ApiModelProperty(notes = "状态 0.失效 1.有效")
    private Integer status;

    public static PartnerCode getInstance() {
        return new PartnerCode();
    }
}
